<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改兑换产品</title>
<script language="javascript">
<!--
function check(form){
	if(form.name.value==""){
		alert("名称不能为空！");
		form.name.focus();
		return false;
	}
	/*
    if(form.photo.value==""){
		alert("请选择要上传的产品图片！");
		form.photo.focus();
		return false;
	}
	*/
	form.submitbutton.disabled = true;
	return true;
}
//-->
</script>
</head>

<body>
<table border="0" align="center" cellpadding="0" cellspacing="1" class="navi">
  <tr>
    <th>当前位置：<?php echo $product_title;?></th>
  </tr>
</table>
<br />
<form id="form1" name="form1" method="post" enctype="multipart/form-data" action="<?php echo SystemProperties::$app_host.$changes_action;?>" onSubmit="return check(this);">
  <table border="0" align="center" cellpadding="0" cellspacing="1" class="list">
    <tr>
      <th colspan="2"><?php echo $product_title;?>
      <input type="hidden" name="data[g_changes][g_id]" value="<?php echo $this->data['g_changes']['g_id']?>"/>
      </th>
    </tr>
    <tr>
      <td width="20%" height="25" align="right">名称：</td>
      <td><?php echo $form->text('g_changes.g_name',array('maxlength'=>'128')); ?></td>
    </tr>
    <tr>
      <td width="20%" height="25" align="right">产品发放类型：</td>
      <td>
      <?php if (empty($this->data['g_changes']['g_id'])) { ?>
        <?php echo $form->select('g_changes.type',SystemProperties::$p_types); ?>(仅用于新版，必填)
      <?php } else { ?>
       <?=SystemProperties::$p_types[$this->data['g_changes']['type']]?>
           <input type="hidden" name="data[g_changes][type]" value="<?=$this->data['g_changes']['type']?>">
         
      <?php } ?>
      </td>
    </tr>   
	 <tr>
      <td width="20%" height="25" align="right">显示市场价：</td>
      <td><?php echo $form->text('g_changes.g_jiazhi',array('maxlength'=>'128')); ?></td>
    </tr>
     <tr>
      <td width="20%" height="25" align="right">热度(1为最热产品)：</td>
      <td><?php echo $form->text('g_changes.g_hot',array('maxlength'=>'128')); ?></td>
    </tr>
     <tr>
      <td width="20%" height="25" align="right">排序(越大越靠前)：</td>
      <td><?php echo $form->text('g_changes.g_order',array('maxlength'=>'128')); ?></td>
    </tr>    
	 <tr>
      <td width="20%" height="25" align="right">剩余数量：</td>
      <td><?php echo $form->text('g_changes.g_number',array('maxlength'=>'128')); ?></td>
    </tr>
	 <tr>
      <td width="20%" height="25" align="right">积分：<br />积分和金币只能选一个填写</td>
      <td><?php echo $form->text('g_changes.g_exchanges',array('maxlength'=>'128')); ?></td>
    </tr>
	 <tr>
      <td width="20%" height="25" align="right">金币：<br />积分和金币只能选一个填写</td>
      <td><?php echo $form->text('g_changes.g_exchanges_gold',array('maxlength'=>'128')); ?></td>
    </tr>    
    <tr>
      <td width="20%" height="25" align="right">是否100%优惠码发放产品：</td>
      <td>
      此项已经合并至商品类型，商品类型选择“优惠码”即可。<br />
      (如勾选此项，请注意稍后从管理列表进入优惠码管理页面进行优惠码添加）
      </td>
    </tr> 
    
    <?php 
    $data = SystemProperties::$img_names;    
    foreach ($data as $n=>$da){?>    
    <tr>
      <td height="25" align="right"><?=$n==0?'产品列表图片(160X160)':'产品介绍图'.$n?>：</td>
      <td>
      <?php if (empty($this->data['g_changes'][$da])) { ?>
      无<br />
      <?php } else { ?>
      <img src="<?=SystemProperties::$path.$this->data['g_changes'][$da]?>" width="80" height="60" /><br />
      <?php } ?>
      <?php echo $form->file('g_changes.g_img'.$n); ?></td>
    </tr>
    <?php } ?>
    <tr>
      <td width="20%" height="25" align="right">产品网站地址(用于广告地址或优惠码官方地址,以http://开头)：)</td>
      <td><?php echo $form->text('g_changes.g_protal_url',array('maxlength'=>'256','style'=>'width:300px')); ?></td>
    </tr>
    <tr>
      <td width="20%" height="25" align="right">附加商城立即领取、淘宝快递费地址(以http://开头)：</td>
      <td><?php echo $form->text('g_products.g_extra_url',array('maxlength'=>'256','style'=>'width:300px')); ?></td>
    </tr>
    <tr>
      <td  align="right">介绍：</td>
       <td><?php echo $form->textarea('g_changes.g_description',array('style' => 'width:400px;height:120px'))?>
      </td>
    </tr>
    <tr>
      <td height="25" align="right">&nbsp;</td>
      <td><input type="submit" name="submitbutton" value="修改" id="submitbutton" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="reset" name="Submit2" value="重置" /></td>
    </tr>
  </table>
</form>
<script type="text/javascript">
				//<![CDATA[
					CKEDITOR.replace( 'g_changesGDescription',{skin : 'office2003'} );
				//]]>
</script>
</body>
</html>

